package com.song.service.role;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.song.dao.role.RoleDao;
import com.song.dao.role.UserRoleDao;
import com.song.entity.role.UserRole;
import com.song.entity.role.UserRoleInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userRoleService")
public class UserRoleServiceImpl extends ServiceImpl<UserRoleDao,UserRole> implements UserRoleService {


    @Autowired
    private UserRoleDao userRoleDao;

    @Autowired
    private RoleDao roleDao;

    /**
     *  查询用户角色列表
     */
    @Override
    public List<UserRoleInfo> selectUserRoles(Integer userId) {
        return userRoleDao.selectUserRoles(userId);
    }

    @Override
    public int batAddUserRole(List<UserRole> list) {
        return userRoleDao.batAddUserRole(list);
    }
}







